<template>
    <div>
        <el-dialog title="个人信息" v-model="editVisible" width="35%">
            <el-form label-width="100px" ref="formData" :rules="rules" :model="dialogForm">
                <el-form-item label="用户名" prop="name" clearable>
                    <el-input v-model="dialogForm.name"></el-input>
                </el-form-item>
                <el-form-item label="年龄" prop="age" clearable>
                    <el-input v-model="dialogForm.name"></el-input>
                </el-form-item>
                <el-form-item label="地址" prop="address" clearable>
                    <el-input v-model="dialogForm.address"></el-input>
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="cancel">取 消</el-button>
                    <el-button type="primary" @click="affirm">确 定</el-button>
                </span>
            </template>
        </el-dialog>
    </div>
</template>
    
<script setup>
import { ref } from 'vue';

const stext = ref('我是子组件的值')
const sfunction = () => {
    console.log("我是子组件的方法")
}
defineExpose({
    stext,
    sfunction
})
</script>